//
//  ZZMusicCell.m
//  planning
//
//  Created by mac on 2019/7/30.
//  Copyright © 2019 mac. All rights reserved.
//

#import "ZZMusicCell.h"

#import "ZZMusic.h"

@interface  ZZMusicCell()

@end

@implementation ZZMusicCell

+ (instancetype)cellWithTableView:(UITableView *)tableView

{
    
    static NSString *ID = @"music";
    
    ZZMusicCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    
    if (cell == nil) {
        
        cell = [[ZZMusicCell  alloc] initWithStyle:UITableViewCellStyleSubtitle  reuseIdentifier:ID];
        
    }
    
    return cell;
    
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier

{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.backgroundColor = [UIColor  clearColor];
        
//        self.selectedBackgroundView = [[UIImageView  alloc] initWithImage:[UIImage  imageNamed:@"backgroundImage"]];
        
    }
    
    return  self;
    
}

- (void)setMusic:(ZZMusic *)music

{
    
    _music = music;
    
    self.textLabel.text = music.name;
    
    self.detailTextLabel.text = music.singer;
    
    self.imageView.image = [UIImage  imageNamed:music.singerIcon];
    
}

@end
